import { IsString, Matches, MaxLength, MinLength } from 'class-validator'

export class CreateOperationDto {
  @IsString()
  @MinLength(2)
  @MaxLength(32)
  @Matches(/^[a-zA-Z]+$/, { message: '操作编码必须为英文字母' })
  code: string

  @IsString()
  @MinLength(2)
  @MaxLength(32)
  name: string

  @IsString()
  description?: string
}
